package com.boyiis.sell.enums;

import lombok.Getter;

@Getter
public enum ResultEnum {
    SUCCESS(0, "成功"),

    PARAM_ERROR(1,"参数不正确"),

    PRODUCT_NOT_EXIST(10,"商品不存在"),
    PRODUCT_STOCK_ERROR(11, "库存不足"),
    PRODUCT_STATUS_ERROR(11, "商品状态不正确"),

    ORDER_NOT_EXIST(20,"订单不存在"),
    ORDER_DETAIL_NOT_EXIST(21,"订单详情不存在"),
    ORDER_STATUS_ERROR(22,"订单状态不正确"),
    ORDER_UPDATE_FAIL(23,"订单更新失败"),
    ORDER_DETAIL_EMPTY(24,"订单详情为空"),
    ORDER_PAY_STATUS_ERROR(25,"订单支付状态不正确"),
    ORDER_OWNER_ERROR(27,"没有权限查询该订单"),
    ORDER_FINISH_ERROR(28,"订单完结成功"),

    CART_EMPTY(26,"购物车为空"),

    WX_MP_ERROR(30,"微信公众账号错误"),

    WX_PAY_AMOUNT_ERROR(41,"微信支付异步通知金额校验不通过"),

    WX_LOGIN_FAIL(51,"微信登录失败"),

    WX_LOGOUT_SUCCESS(51,"微信登录注销成功"),

    ;

    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
